package 强化训练;

import java.util.Scanner;

public class 字符串中最长连续数字串 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int maxLen = 1;
        int l = 0;
        int r = 1;
        String str = sc.next();
        char a = '0';
        char b = '9';
        int len = str.length();
        char[] ch = str.toCharArray();
        String res = str.substring(0,1);
        while(l <= r && r < len && 1 <= r){
            while(ch[r] >= '0' && ch[r] <= '9'){
                r++;
                if(r >= len) break;
            }
            if(maxLen < (r - l)){
                maxLen = r - l;
                res = str.substring(l,r);
            }
            l = r + 1;
            r++;
        }
        l = 0;
        r = 1;
        System.out.println(res);
    }
}
